using System;
using System.Runtime.Versioning;

namespace Xunit.SimpleRunner;

/// <summary>
/// Indicates that test execution has started.
/// </summary>
public class ExecutionStartingInfo
{
	/// <summary>
	/// Gets the seed value used for randomization.
	/// </summary>
	/// <remarks>
	/// For v1 and v2 test projects, this value will be <c>null</c>, as they do not support custom seeds.<br />
	/// For v3 test projects, this value will usually not be <c>null</c>.<br />
	/// There is no guarantee that custom test frameworks will support custom seeds.
	/// </remarks>
	public required int? Seed { get; set; }

	/// <summary>
	/// Gets the date and time when the test assembly execution started.
	/// </summary>
	public required DateTimeOffset StartTime { get; set; }

	/// <summary>
	/// Gets the target framework that the assembly was compiled against.<br />
	/// Examples:<br />
	/// * <c>.NETFramework,Version=v4.7.2</c><br />
	/// * <c>.NETCoreApp,Version=v8.0</c>
	/// </summary>
	/// <remarks>
	/// This information is read from <see cref="TargetFrameworkAttribute"/> on the test assembly, which
	/// is normally auto-generated by the compiler (but could be missing or empty).
	/// </remarks>
	public required string? TargetFramework { get; set; }

	/// <summary>
	/// Gets a display string that describes the test execution environment.<br />
	/// Examples: <br />
	/// * <c>32-bit .NET Framework 4.8.9300.0</c><br />
	/// * <c>64-bit .NET 8.0.16</c>
	/// </summary>
	public required string TestEnvironment { get; set; }

	/// <summary>
	/// Gets a display string which describes the test framework and version number.
	/// Examples: "xUnit.net v3 0.1.0-pre.15", "xUnit.net 2.4.1"
	/// </summary>
	public required string TestFrameworkDisplayName { get; set; }
}
